/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uloha4.entities;

import java.util.ArrayList;
import java.util.Iterator;

/**
 *
 * @author Tomique
 */
public class MyList<T> implements Iterable<T> {

    private ArrayList<T> storage;

    public MyList() {
        storage = new ArrayList<>();
    }

    public void add(T t) {
        storage.add(t);
    }

    public T get(int index) {
        return storage.get(index);
    }

    public int size() {
        return storage.size();
    }
    
    public boolean isEmpty() {
        return storage.isEmpty();
    }

    @Override
    public Iterator<T> iterator() {
        return storage.listIterator();
    }
}
